package cn.enilu.flash.bean.entity.park;

import cn.enilu.flash.bean.entity.BaseEntity;
import lombok.Data;
import org.hibernate.annotations.Table;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.validation.constraints.NotNull;

/**
 * @Description
 * @Author Spark
 * @Date Created in (2019/11/04 17:43)
 * @Version v1.0
 * @Modify
 **/
@Entity(name="parking_quote")
@Table(appliesTo = "parking_quote",comment = "车位报价")
@Data
@EntityListeners(AuditingEntityListener.class)
public class ParkingQuote extends BaseEntity {
    @Column(name = "community_id", columnDefinition = "BIGINT COMMENT '社区ID'")
    @NotNull(message = "社区未关联")
    private Long communityId;

    @Column(name = "quote_type", columnDefinition = "INT COMMENT '报价类型'")
    @NotNull(message = "报价类型不能为空")
    private Integer quoteType;

    @Column(name = "quote_range", columnDefinition = "INT COMMENT '报价周期'")
    @NotNull(message = "报价周期不能为空")
    private Integer quoteRange;

    @Column(name = "quote_unit", columnDefinition = "INT COMMENT '报价周期单位'")
    @NotNull(message = "报价周期单位不能为空")
    private Integer quoteUnit;

    @Column(name = "quote_price", columnDefinition = "DOUBLE(8,2) COMMENT '报价'")
    @NotNull(message = "报价不能为空")
    private Double quotePrice;
}
